<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>个人信息</title>
	<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">	
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">	
	<link rel="stylesheet" type="text/css" href="/Public/admin/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="/Public/admin/bootstrap/css/bootstrap.css" media="all">
	<link rel="stylesheet" type="text/css" href="/Public/admin/global.css" media="all">
	<link rel="stylesheet" type="text/css" href="/Public/admin/css/personal.css" media="all">
</head>
<body>
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  <ul class="layui-tab-title">
    <li class="layui-this">权限规则</li>
    <li>角色管理</li>
  </ul>
  <div class="layui-tab-content">
    <div class="layui-tab-item layui-show">
      <a href="/admin/auth/rule_add"><button class="layui-btn"><i class="layui-icon">&#xe60a;</i>添加权限规则</button></a>
      <table class="layui-table">
        <colgroup>
          <col width="150">
          <col width="200">
          <col width="150">
          <col>
        </colgroup>
        <thead>
          <tr>
            <th>权限名</th>
            <th>规则<span style="color: #CCC;">（控制器/动作）</span></th>
            <th>状态</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          <?php if(is_array($rule_list)): $i = 0; $__LIST__ = $rule_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$rulelist): $mod = ($i % 2 );++$i;?><tr>
            <td><?php echo ($rulelist['title']); ?></td>
            <td><?php echo ($rulelist['name']); ?></td>
            <td><?php echo ($rulelist['status']==1?'启用':'禁用'); ?></td>
            <td>
              <a href="/admin/auth/rule_edit/id/<?php echo ($rulelist['id']); ?>" class="layui-btn layui-btn-small">编辑</a>
              <a href="/admin/auth/rule_del/id/<?php echo ($rulelist['id']); ?>" class="layui-btn layui-btn-small layui-btn-danger">删除</a>
            </td>
          </tr><?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
      </table>
    </div>
    <div class="layui-tab-item">
      <a href="/admin/auth/group_add"><button class="layui-btn"><i class="layui-icon">&#xe60a;</i>添加角色组</button></a>
      <table class="layui-table">
        <colgroup>
          <col width="150">
          <col width="600">
          <col width="100">
          <col>
        </colgroup>
        <thead>
          <tr>
            <th>角色组名</th>
            <th>规则</th>
            <th>状态</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          <?php if(is_array($group_list)): $i = 0; $__LIST__ = $group_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$grouplist): $mod = ($i % 2 );++$i;?><tr>
            <td><?php echo ($grouplist['title']); ?></td>
            <td><?php echo ($grouplist['rules']); ?></td>
            <td><?php echo ($grouplist['status']==1?'启用':'禁用'); ?></td>
            <td>
              <a href="/admin/auth/group_edit/id/<?php echo ($grouplist['id']); ?>" class="layui-btn layui-btn-small">编辑</a>
              <a href="/admin/auth/group_del/id/<?php echo ($grouplist['id']); ?>" class="layui-btn layui-btn-small layui-btn-danger">删除</a>
            </td>
          </tr><?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
      </table>
    </div>
  </div>
</div>
<script type="text/javascript" src="/Public/admin/layui/layui.js"></script>
<script>
layui.use('element', function(){
  var $ = layui.jquery
  ,element = layui.element(); //Tab的切换功能，切换事件监听等，需要依赖element模块
});
</script>
</body>
</html>